package com.atguigu.jxc;

import com.alibaba.fastjson.JSON;
import com.atguigu.jxc.entity.DamageListGoods;

import java.util.List;

public class adn {

    public static void main(String[] args) {

        String a = "[{\"goodsId\":38,\"goodsTypeId\":20,\"goodsCode\":\"0028\",\"goodsName\":\"神光棒\",\"goodsModel\":\"发光\",\"goodsUnit\":\"个\",\"lastPurchasingPrice\":0,\"price\":\"3\",\"goodsNum\":\"1\",\"total\":3}]";
        List<DamageListGoods> damageListGoodsList = JSON.parseArray(a, DamageListGoods.class);
        for (DamageListGoods damageListGoods : damageListGoodsList) {
            System.out.println(damageListGoods);
        }
    }
}
